package com.test.rabbitmq.controller;

import com.test.rabbitmq.service.SendService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "/rabbit",produces = MediaType.APPLICATION_JSON_VALUE)
@ApiModel("测试rabbitMQ相关方法")
public class RabbitController {
    @Resource
    public SendService sendService;
    @ApiOperation(value="发送消息", notes="发送消息")
    @RequestMapping(value = "/send",method = RequestMethod.GET)
    public void send(){
        sendService.testSend();
    }
}
